<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title> - whowin - 发表我个人原创作品的技术博客</title>
  <meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<meta name="theme-color" content="#f8f5ec" />
<meta name="msapplication-navbutton-color" content="#f8f5ec">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#f8f5ec">


<meta name="author" content="whowin" /><meta name="description" content="分区信息表的结构 私人日志 2008-07-16 10:53:07 硬盘的0柱面、0磁头、1扇区称为主引导扇区，该扇区的内容称为主引导记录（Main Boot Record（MBR）），在M" /><meta name="keywords" content="linux, socket, hugo, dos" />






<meta name="generator" content="Hugo 0.97.3 with theme even" />


<link rel="canonical" href="https://whowin.gitee.io/post/blog/dos/2008-07-16%E5%88%86%E5%8C%BA%E4%BF%A1%E6%81%AF%E8%A1%A8%E7%9A%84%E7%BB%93%E6%9E%84/" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">



<link href="/sass/main.min.e3fea119b1980e848b03dffbeddb11dd0fba483eed0e5f11870fb8e31f145bbd.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.css" integrity="sha256-7TyXnr2YU040zfSP+rEcz29ggW4j56/ujTPwjMzyqFY=" crossorigin="anonymous">


<meta property="og:title" content="" />
<meta property="og:description" content="分区信息表的结构 私人日志 2008-07-16 10:53:07 硬盘的0柱面、0磁头、1扇区称为主引导扇区，该扇区的内容称为主引导记录（Main Boot Record（MBR）），在M" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://whowin.gitee.io/post/blog/dos/2008-07-16%E5%88%86%E5%8C%BA%E4%BF%A1%E6%81%AF%E8%A1%A8%E7%9A%84%E7%BB%93%E6%9E%84/" /><meta property="article:section" content="post" />



<meta itemprop="name" content="">
<meta itemprop="description" content="分区信息表的结构 私人日志 2008-07-16 10:53:07 硬盘的0柱面、0磁头、1扇区称为主引导扇区，该扇区的内容称为主引导记录（Main Boot Record（MBR）），在M">

<meta itemprop="wordCount" content="651">
<meta itemprop="keywords" content="" /><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content=""/>
<meta name="twitter:description" content="分区信息表的结构 私人日志 2008-07-16 10:53:07 硬盘的0柱面、0磁头、1扇区称为主引导扇区，该扇区的内容称为主引导记录（Main Boot Record（MBR）），在M"/>

<!--[if lte IE 9]>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20170427/classList.min.js"></script>
<![endif]-->

<!--[if lt IE 9]>
  <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
<![endif]-->

  <script async src="/js/busuanzi.pure.mini.js"></script><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9724909319263152"
     crossorigin="anonymous"></script>


</head>
<body>
  <div id="mobile-navbar" class="mobile-navbar">
  <div class="mobile-header-logo">
    <a href="/" class="logo">WhoWin</a>
  </div>
  <div class="mobile-navbar-icon">
    <span></span>
    <span></span>
    <span></span>
  </div>
</div>
<nav id="mobile-menu" class="mobile-menu slideout-menu">
  <ul class="mobile-menu-list">
    <a href="/">
        <li class="mobile-menu-item">首页</li>
      </a><a href="/post/">
        <li class="mobile-menu-item">文章归档</li>
      </a><a href="/article-categories/categories/">
        <li class="mobile-menu-item">文章分类</li>
      </a><a href="/tags/">
        <li class="mobile-menu-item">文章标签</li>
      </a><a href="/about/about/">
        <li class="mobile-menu-item">关于</li>
      </a>
  </ul>

  


</nav>

  <div class="container" id="mobile-panel">
    <header id="header" class="header">
        <div class="logo-wrapper">
  <a href="/" class="logo">WhoWin</a>
  
  <div style="position:absolute; left: 80px; top: 75px; color: crimson">
      ———开源和分享是技术发展的源泉和动力；本博客所有文章均为原创
  </div>
</div>





<nav class="site-navbar">
  <ul id="menu" class="menu">
    <li class="menu-item">
        <a class="menu-item-link" href="/">首页</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/post/">文章归档</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/article-categories/categories/">文章分类</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/tags/">文章标签</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/about/about/">关于</a>
      </li>
  </ul>
</nav>

    </header>

    <main id="main" class="main">
      <div class="content-wrapper">
        <div id="content" class="content">
          <article class="post">
    
    <header class="post-header">
      <h1 class="post-title"></h1>

      <div class="post-meta">
        <span class="post-time"> 0001-01-01 </span>
        
        
      </div>
    </header>

    <div class="post-toc" id="post-toc">
  <h2 class="post-toc-title">文章目录</h2>
  <div class="post-toc-content always-active">
    <nav id="TableOfContents">
  <ul>
    <li><a href="#分区信息表的结构--私人日志">分区信息表的结构  私人日志</a></li>
  </ul>
</nav>
  </div>
</div>
    <div class="post-content">
      <h1 id="分区信息表的结构--私人日志">分区信息表的结构  私人日志</h1>
<p><strong>2008-07-16 10:53:07</strong></p>
<blockquote>
<p>硬盘的0柱面、0磁头、1扇区称为主引导扇区，该扇区的内容称为主引导记录（Main Boot Record（MBR）），在MBR中偏移地址01BEH&ndash;01FDH的64个字节，叫做分区信息表，可以最多记录4个分区项内容。</p>
</blockquote>
<ul>
<li>
<p>读取MBR的程序：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">  mov ax,0201      ;ah=2 读取扇区；al=1  读取一个扇区
</span></span><span class="line"><span class="cl">  mov bx,1000      ;读取内容放到这个偏移地址上
</span></span><span class="line"><span class="cl">  mov cx,0001      ;0柱面（cl高2位+ch），1扇区（cl低6位）
</span></span><span class="line"><span class="cl">  mov dx,0080      ;0磁头（dh），硬盘c（dl：0-A盘，1-B盘，80h-硬盘c，81h-硬盘D）
</span></span><span class="line"><span class="cl">  int 13
</span></span><span class="line"><span class="cl">  int 3
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  我喜欢在debug中执行这段程序。
</span></span></code></pre></td></tr></table>
</div>
</div></li>
<li>
<p>分区信息表结构：</p>
<table>
<thead>
<tr>
<th style="text-align:center">字节偏移</th>
<th style="text-align:left">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">0</td>
<td style="text-align:left">引导标志。若值为80H表示活动分区，若值为00H表示非活动分区。</td>
</tr>
<tr>
<td style="text-align:center">1-3</td>
<td style="text-align:left">本分区的起始磁头号、扇区号、柱面号。其中：磁头号—第1字节；扇区号—第2字节的低6位；柱面号—为第2字节高2位+第3字节8位</td>
</tr>
<tr>
<td style="text-align:center">4</td>
<td style="text-align:left">分区类型符：<br />00H——表示该分区未用(即没有指定)<br/>01h－－FAT12基本分区<br />04H－－FAT16基本分区<br />06H——big FAT16基本分区<br />0BH——FAT32基本分区<br />05H——扩展分区<br />07H——NTFS分区<br />0FH——（LBA模式）扩展分区(83H为Linux分区等)</td>
</tr>
<tr>
<td style="text-align:center">5-7</td>
<td style="text-align:left">本分区的结束磁头号、扇区号、柱面号。其中：<br />磁头号——第1字节；<br />扇区号——第2字节的低6位；<br />柱面号——第2字节的高2位+第3字节</td>
</tr>
<tr>
<td style="text-align:center">8-11</td>
<td style="text-align:left">分区起始扇区数，指分区相对于记录该分区的分区表的扇区位置之差(该分区表：LBA=0x0)</td>
</tr>
<tr>
<td style="text-align:center">12-15</td>
<td style="text-align:left">本分区的总扇区数</td>
</tr>
</tbody>
</table>
</li>
<li>
<p>可能近期要用，为避免找不到，索性放到博客里。</p>
</li>
</ul>

    </div>

    <div class="post-copyright">
  <p class="copyright-item">
    <span class="item-title">文章作者</span>
    <span class="item-content">whowin</span>
  </p>
  <p class="copyright-item">
    <span class="item-title">上次更新</span>
    <span class="item-content">
        0001-01-01
        
    </span>
  </p>
  
  
</div>
<footer class="post-footer">
      
      <nav class="post-nav">
        <a class="prev" href="/post/blog/dos/2008-07-15usb%E7%B3%BB%E5%88%97%E4%B9%8B%E5%9B%9B%E5%90%91u%E7%9B%98%E4%B8%8A%E5%86%99%E6%95%B0%E6%8D%AE/">
            <i class="iconfont icon-left"></i>
            <span class="prev-text nav-default"></span>
            <span class="prev-text nav-mobile">上一篇</span>
          </a>
        
      </nav>
    </footer>
  </article>
        </div>
        

  <span id="/post/blog/dos/2008-07-16%E5%88%86%E5%8C%BA%E4%BF%A1%E6%81%AF%E8%A1%A8%E7%9A%84%E7%BB%93%E6%9E%84/" class="leancloud_visitors" data-flag-title="">
		<span class="post-meta-item-text">文章阅读量 </span>
		<span class="leancloud-visitors-count">0</span>
		<p></p>
	  </span>
  <div id="vcomments"></div>
  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  <script src='//unpkg.com/valine/dist/Valine.min.js'></script>
  <script type="text/javascript">
    new Valine({
        el: '#vcomments' ,
        appId: 'OFCGzCfJRUglzOdzrqMGkbTR-gzGzoHsz',
        appKey: 'v7P29kPAEbsmaavaYPNhGhnF',
        notify:  false ,
        verify:  false ,
        avatar:'mm',
        placeholder: '说点什么吧...',
        visitor:  true 
    });
  </script>

  

      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="social-links">
      <a href="mailto:hengch@163.com" class="iconfont icon-email" title="email"></a>
  <a href="https://whowin.gitee.io/index.xml" type="application/rss+xml" class="iconfont icon-rss" title="rss"></a>
</div>
<div class="copyright">
  <span class="power-by">
    由 <a class="hexo-link" href="https://gohugo.io">Hugo</a> 强力驱动
  </span>
  <span class="division">|</span>
  <span class="theme-info">
    主题 - 
    <a class="theme-link" href="https://github.com/olOwOlo/hugo-theme-even">Even</a>
  </span>

  <div class="busuanzi-footer">
    <span id="busuanzi_container_site_pv"> 本站总访问量 <span id="busuanzi_value_site_pv"><img src="/img/spinner.svg" alt="spinner.svg"/></span> 次 </span>
      <span class="division">|</span>
    <span id="busuanzi_container_site_uv"> 本站总访客数 <span id="busuanzi_value_site_uv"><img src="/img/spinner.svg" alt="spinner.svg"/></span> 人 </span>
  </div>

  <span class="copyright-year">
    &copy; 
    2022 - 
    2024<span class="heart"><i class="iconfont icon-heart"></i></span><span>whowin</span>
  </span>
</div>

    </footer>

    <div class="back-to-top" id="back-to-top">
      <i class="iconfont icon-up"></i>
    </div>
  </div>
  
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/slideout@1.0.1/dist/slideout.min.js" integrity="sha256-t+zJ/g8/KXIJMjSVQdnibt4dlaDxc9zXr/9oNPeWqdg=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.js" integrity="sha256-XVLffZaxoWfGUEbdzuLi7pwaUJv1cecsQJQqGLe7axY=" crossorigin="anonymous"></script>



<script type="text/javascript" src="/js/main.min.64437849d125a2d603b3e71d6de5225d641a32d17168a58106e0b61852079683.js"></script>
  <script type="text/javascript">
    window.MathJax = {
      tex: {
        inlineMath: [['$','$'], ['\\(','\\)']],
        }
    };
  </script>
  <script async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.5/es5/tex-mml-chtml.js" integrity="sha256-HGLuEfFcsUJGhvB8cQ8nr0gai9EucOOaIxFw7qxmd+w=" crossorigin="anonymous"></script>








</body>
</html>
